from manimlib import *
from numpy import square
import numpy as np

class Test(Scene):
    #75cfb8
    #浅绿
    #bbdfc8
    #浅黄
    #f0e5d8
    #深黄
    #ffc478
    def construct(self):
        m=Tex(r'\frac{1}{2 !}+\frac{2}{3 !}+\frac{3}{4 !}+\cdots=1',color=BLACK,substrings_to_isolate="x", font_size=111)
        m.set_color_by_gradient(RED,BLACK,YELLOW_E,BLACK,BLACK,YELLOW_E,BLACK, BLUE,BLACK,BLACK,BLUE,BLACK, GREEN,BLACK,BLACK,BLACK,BLACK,BLACK,BLACK,'#75cfb8')
        self.add(m)
        self.wait(0.5)